<!-- 奢侈品模块 -->
<template>
  <div class="luxury">
    <div class="lixury-img">
      <img src="@/assets/images/shechi.jpeg" alt="" />
    </div>
    <div class="luxury-content">
      <ul>
        <li v-for="(luxuryList, index) in luxuryLists" :key="index">
          <div class="content-img">
            <img :src="luxuryList.src" alt="" />
          </div>
          <div> <p class="content-title">{{ luxuryList.title }}</p></div>
          <p class="content-price">{{ luxuryList.price }}</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  //import引入的组件需要注入到components对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      luxuryLists: [
        {
          id: 1,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
        {
          id: 2,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
        {
          id: 3,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
        {
          id: 4,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
        {
          id: 5,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
        {
          id: 6,
          src:
            "https://img.alicdn.com/imgextra/i1/2087981999/O1CN01AGF6i81QdaLdC5UH4_!!2087981999-0-lubanu-s.jpg_800x800.jpg?imageView2/2/format/webp",
          title: "DR TRUE LOVE系列情圆一生求婚钻戒结婚钻石戒指女戒白18K金",
          price: "7060.00",
        },
      ],
    };
  },

  methods: {},
};
</script>
<style lang="less">
.luxury {
  margin: 1rem 1rem 0;
  border-radius: 1rem;
  padding: 0 0 2rem;
  background-color: rgb(44, 77, 105);
  height: 48rem;
  .lixury-img {
    img {
      width: 100%;
      border-radius: 1rem;
    }
  }
  .luxury-content {
    width: 100%;
    position: relative;
    top: -8rem;
    left: 0;
    ul {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      li {
        width: 10.5rem;
        height: 18rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    
        .content-img {
            height: 10rem;
          img {
            width: 100%;
            height: 10rem;
            border-top-right-radius: 1rem;
            border-top-left-radius: 1rem;
          }
        }
        .content-title {
          font-size: 1.2rem;
          padding: 0.4rem  0.5rem;
          height: 4rem;
          line-height: 2rem;
          overflow: hidden;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          text-overflow: ellipsis;
          -webkit-box-orient: vertical;
          background-color: #fff;
        }
        .content-price{
            height: 3rem;
             border-bottom-right-radius: 1rem;
            border-bottom-left-radius: 1rem;
            font-size: 1.4rem;
            font-weight: 700;
            background-color: #fff;
            color: rgb(242, 14, 40);
              &::before {
          content: "￥";
        }
        }
      }
    }
  }
}
</style>